<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class public_controller extends MY_Controller
{
    public $view_data = array();

    public function __construct()
    {
        parent::__construct();
		$this->view_data['css'] = array();
		$this->view_data['js'] = array();
    }

    public function load_view($view_path_name)
    {
        $this->view_data['theme_path'] = base_url();
        $this->load->view('master_page/header',$this->view_data);
        $this->load->view($view_path_name,$this->view_data);
        $this->load->view('master_page/footer',$this->view_data);
    }

	/*
	 * Include css file in header. For example : $this->addCss('style').
	 */
	public function addCss($css_name)
	{
		$this->view_data['css'][] = $css_name;
	}

	/*
	 * Include javascript file to header. For example : $this->addJs('jquery').
	 */

	public function addJs($js_name)
	{
		$this->view_data['js'][] = $js_name;
	}
}